﻿@using TinyMoocSite.ViewModels
@model AddHomeworkForm

@{
    ViewBag.Title = "更新作业数据";
    Layout = "~/Views/Teacher/CoursePageLayout.cshtml";
}

@section Homework { active }

@section RightContainer
{
    <h4>作业中心&raquo;更新作业信息</h4><hr />
    <form role="form" action="/Teacher/DoAlterHomework" method="post" class="register-form">
        <input type="hidden" name="Id" value="@Model.Id" />
        <input type="hidden" name="HomeworkId" value="@Model.HomeworkId" />

        <div class="form-group">
            <label for="form-title" class="col-sm-2 control-label">作业名称</label>
            <div class="col-sm-10">
                <input type="text" name="HomeworkTitle" class="form-control" id="form-title" 
                       value="@Model.HomeworkTitle">
            </div>
        </div>

        <br /><br />

        <div class="form-group">
            <label for="form-start-time" class="col-sm-2 control-label">起止时间</label>
            <div class="col-sm-1">
                从
            </div>
            <div class="col-sm-4">
                <input type="date" name="HomeworkStartDate" class="form-control" id="form-start-time" 
                       value="@Model.HomeworkStartDate.ToString("yyyy-MM-dd")">
            </div>
            <div class="col-sm-1">
                至
            </div>
            <div class="col-sm-4">
                <input type="date" name="HomeworkEndDate" class="form-control" id="form-end-time"
                       value="@Model.HomeworkStartDate.ToString("yyyy-MM-dd")">
            </div>
        </div>

        <br /><br />

        <div class="text-center">
            <button type="submit" class="btn btn-default">更新作业信息</button>
            &nbsp;&nbsp;
            <button type="button" class="btn btn-default" onclick="history.back();">返回</button>
        </div>

        <br /><br />
    </form>

}

